<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>用户</title>
    <a th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath() + '/'} " id="contextPath"></a>
    <script src="js/jquery-3.4.1.min.js"></script>
    <script src="layui/layui.js"></script>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="js/usermanager.js"></script>
</head>
<style>
    .heimu,.heimu a{
        background-color: #252525;
        color:#252525;
        text-shadow: none;
    }::selection{
         background:#9ab0c0;
         color:#fff;
     }
</style>
<body>

<div class="layui-row layui-col-space10">
    <div class="layui-col-md8 layui-col-md-offset2">
        <h1 style="display : inline">用户管理</h1><h2 style="display : inline"><a href="/ManagerPic">图片管理</a></h2><h2 style="display : inline"><a href="/UploadPic">图片上传</a></h2><br>
        <h2>登录用户：
            <span th:if="${username} != null">
                <span th:text="${username}">用户名</span>
                <a href="/Logout">注销</a>
            </span>

        </h2>
        <span th:if="${username} == null">
        <form class="layui-form" action="">
            <label class="layui-form-label">账号</label>
            <div class="layui-input-block">
                <input id="username" type="text" name="title" required  lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input" style="width: 190px">
            </div>
            <br>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input id="password" type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux" id="tips"></div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="button" class="layui-btn" onclick="login()">登录</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">如果输入了不存在的用户名<a class="heimu">黑暗剑22</a><br>将会直接注册账号</div>
                </div>
            </div>
        </form>
        </span>
    </div>
</div>

</body>
<script>
    layui.use('layer', function(){
        var layer = layui.layer;


    });
</script>
</html>